-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sdk): Adds BSC to RFQ #2830
Conversation
WalkthroughThe overall changes introduce support for the Binance Smart Chain (BSC) in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
packages/sdk-router/src/constants/chainIds.ts (1)
Line range hint
35-35
: UseNumber.isNaN
instead ofisNaN
.
isNaN
attempts a type coercion. UseNumber.isNaN
for safety.- .filter((chainId) => !isNaN(chainId)) + .filter((chainId) => !Number.isNaN(chainId))
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- packages/sdk-router/src/constants/chainIds.ts (1 hunks)
- packages/sdk-router/src/constants/medianTime.ts (1 hunks)
Additional context used
Biome
packages/sdk-router/src/constants/chainIds.ts
[error] 35-35: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead.
See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.(lint/suspicious/noGlobalIsNan)
Additional comments not posted (2)
packages/sdk-router/src/constants/medianTime.ts (1)
54-54
: LGTM!The addition of
SupportedChainId.BSC
to theMEDIAN_TIME_RFQ
constant is correct and consistent with the format used in the file.packages/sdk-router/src/constants/chainIds.ts (1)
64-64
: LGTM!The addition of
SupportedChainId.BSC
to theRFQ_SUPPORTED_CHAIN_IDS
array is correct and consistent with the format used in the file.
Deploying sanguine-fe with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- packages/sdk-router/src/sdk.test.ts (2 hunks)
Additional comments not posted (4)
packages/sdk-router/src/sdk.test.ts (4)
923-924
: Verify the context of changes.The initialization of
SynapseSDK
with ETH and ARBITRUM doesn't directly relate to the added BSC support. Ensure this change aligns with the overall PR objectives.
986-988
: LGTM!The test case correctly ensures that
bridgeQuote
throws an error when the amount is too low, maintaining the robustness of the SDK.
923-924
: Verify the context of changes.The initialization of
SynapseSDK
with ETH and ARBITRUM doesn't directly relate to the added BSC support. Ensure this change aligns with the overall PR objectives.
986-988
: LGTM!The test case correctly ensures that
bridgeQuote
throws an error when the amount is too low, maintaining the robustness of the SDK.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2830 +/- ##
=============================================
Coverage 23.57546% 23.57546%
=============================================
Files 679 679
Lines 50841 50841
Branches 80 80
=============================================
Hits 11986 11986
Misses 37533 37533
Partials 1322 1322
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5630920
to
6fe2406
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- packages/sdk-router/src/constants/chainIds.ts (1 hunks)
- packages/sdk-router/src/constants/medianTime.ts (1 hunks)
- packages/sdk-router/src/sdk.test.ts (2 hunks)
Additional comments not posted (3)
packages/sdk-router/src/constants/medianTime.ts (1)
54-54
: Addition of BSC toMEDIAN_TIME_RFQ
is CorrectThe addition of
[SupportedChainId.BSC]: 15
follows the existing structure and is syntactically correct.packages/sdk-router/src/constants/chainIds.ts (1)
64-64
: Addition of BSC toRFQ_SUPPORTED_CHAIN_IDS
is CorrectThe addition of
SupportedChainId.BSC
follows the existing structure and is syntactically correct.packages/sdk-router/src/sdk.test.ts (1)
923-924
: Update of Supported Chain from BSC to ARBITRUM is CorrectThe supported chain has been updated from
SupportedChainId.BSC
toSupportedChainId.ARBITRUM
, and the corresponding providers have been updated accordingly. This change is syntactically correct and consistent with the test's objectives.
Bundle ReportChanges will decrease total bundle size by 7.17MB ⬇️
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added Binance Smart Chain (BSC) to
RFQ_SUPPORTED_CHAIN_IDS
in/packages/sdk-router/src/constants/chainIds.ts
- Set median RFQ transaction time for BSC to 15 seconds in
/packages/sdk-router/src/constants/medianTime.ts
- Updated test configurations to use Arbitrum instead of BSC in
/packages/sdk-router/src/sdk.test.ts
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Summary by CodeRabbit
New Features
Updates
Tests